package com.xja.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.xja.mapper.StreetMapper;
import com.xja.bean.Street;
import com.xja.service.StreetService;

import java.util.List;

/**
@author 李岩
@date 2021/12/23-10:32
@describe
*/
@Service
public class StreetServiceImpl implements StreetService{

    @Autowired
    private StreetMapper streetMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return streetMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Street record) {
        return streetMapper.insert(record);
    }

    @Override
    public int insertSelective(Street record) {
        return streetMapper.insertSelective(record);
    }

    @Override
    public Street selectByPrimaryKey(Integer id) {
        return streetMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Street> findAllStreet() {
        return streetMapper.findAllStreet();
    }

    @Override
    public int updateByPrimaryKeySelective(Street record) {
        return streetMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Street record) {
        return streetMapper.updateByPrimaryKey(record);
    }

    //查询所有的街道
    public List<Street> selectAllStreet() throws Exception{
        return streetMapper.selectAllStreet();
    }

}
